package chapter10

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/12 21:00
  * @history:
  *          1.2019/1/12 created by chuhaitao
  */
object ImplictDemo {

  def main(args: Array[String]): Unit = {


    implicit def f2(mysql: Mysql): DB = {
      new DB
    }

    var mysql = new Mysql
    mysql.delete

  }
}


class Mysql {

  def insert: Unit = {

  }
}

class DB {

  def delete: Unit = {
    print("db")
  }
}